package com.unisound.tracelog.server.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TraceLog {

    @TableId(type = IdType.ASSIGN_ID)
    private Long spanId;
    private Long traceId;
    private Long parentSpanId;
    private String name;
    private String serviceName;
    private Integer type;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private Long elapsedTime;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    private String input;
    private String output;
    private Integer resultFlag;
}
